<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="perm" uri="/WEB-INF/tld/perm.tld"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<script>
	var ctx = "${ctx}";
</script>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<meta http-equiv="expires" content="Wed, 26 Feb 209908:21:57 GMT"> 
  
	<link href="${ctx}/static/css/bootstrap.min.css?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/font-awesome.min.css?v=4.4.0?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/animate.min.css?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/style.min.css?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/common.css?v=${static_version}" rel="stylesheet" />
	<link href="//at.alicdn.com/t/font_9x03jhokyws9vn29.css" rel="stylesheet">
	<link href="${ctx}/static/css/plugins/dataTables/dataTables.bootstrap.css?v=${static_version}" rel="stylesheet" /> 
<title>投票中</title>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content  animated fadeInRight">
		<div class="ibox float-e-margins">
	 		<div class="ibox-title">
            	<h5>赛事投票中<small></small></h5>
            </div>           	
			<div class="ibox-content">
			<div class="row  m-b-xs">
			<form action="${ctx}/views/u_match-vote-info-list" method="get" class="form form-horizontal" id="search-form">
			<div class="col-sm-1 m-t-xs">分类：</div> 
			<div class="col-md-2 col-sm-2">					
				<select data-placeholder="--不限--" name="match_cate" class="input-md form-control chosen-select" tabindex="4">
					<option value="-1">--不限--</option>
					<c:forEach items="${match_cates_list}" var="cate">
						<option value="${cate.item_value}" 
							<c:if test="${match_cate==cate.item_value}">selected</c:if>>${cate.display_name}
						</option>					
					</c:forEach>
				</select>						
			</div>
			<div class="col-md-1 col-sm-1">
				<button name="" id="" class="btn btn-primary radius" type="submit">搜索</button>								
			</div>
			
			<div class="col-md-1">
				<a class="btn btn-warning btn-outline radius" onclick="javascript:location.replace(location.href);"
				href="javascript:location.replace(location.href);">刷新</a> 
		    </div>																	
		</form>
		</div>
            <div class="hr-line-dashed3"></div>
		<table data-action="" data-datatable="true"  class="table table-striped table-bordered table-hover dataTables-example">
				<thead>
				<tr class="text-c">                        
                    <th  class="text-center">赛事名</th>
                    <th  class="text-center">缩略图</th>
                    <th  class="text-center">跳转至H5</th>
                    <th  class="text-center">投放金额（元）</th>                          
                    <th  class="text-center">时间</th>
                    <th  class="text-center">状态</th>
                    <th  class="text-center">已报人数</th>
                    <th  class="text-center">投票人数</th>                      
					<th  class="text-center">操作</th>
				</tr>
				</thead>
				<tbody>
					<c:forEach items="${u_matchs}" var="u_match">					
					<tr class="text-c">
                        <td class="text-center">${u_match.match_name}</td>
                        <td class="text-center">
                        	<img src = "${u_match.thumbnail}" style="width:50px;height:50px">
                        </td>
                        <td class="text-center">${u_match.thumbnail_h5}</td>
                        <td class="text-center">${u_match.amount}</td>
                        <td class="text-center">${u_match.pstart_time}
                        		至
                        	${u_match.pend_time}
                        </td>
                        <td class="text-center">
                        <c:if test="${u_match.status == 0}">
                      		  待审核
                      	</c:if>
                        <c:if test="${u_match.status == 1}">
                      		  审核通过
                      	</c:if>
                      	<c:if test="${u_match.status == 2}">
                      		  审核不通过
                      	</c:if>
                        </td>
                        <td  class="text-center">${u_match.ext1}</td>
                        <td  class="text-center">${u_match.ext2}</td>                          
						<td class="td-manage text-center">
							<a class="btn btn-primary radius"
							onClick="u_match_vote_already(this,'${u_match.match_id}','${u_match.ext1}')" href="javascript:void(0);"
							title="已投票人员">已投票人员</a>							
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	
	</div>
	<script src="${ctx}/static/js/jquery.min.js?v=${static_version}"></script>
	<script src="${ctx}/static/js/bootstrap.min.js?v=${static_version}"></script>
	<script src="${ctx}/static/js/plugins/layer/layer.js?v=${static_version}"></script>
	<!-- 插件脚本 -->
	<script src="${ctx}/static/js/plugins/dataTables/jquery.dataTables.js?v=${static_version}"></script>
	<script src="${ctx}/static/js/plugins/dataTables/dataTables.bootstrap.js?v=${static_version}"></script>
	<script type="text/javascript">
	
	$(document).ready(function() {
		$(".dataTables-example").dataTable();
	});
	
		$(function() {
			$('.table-sort').dataTable({
				"aaSorting" : [ [ 0, "desc" ] ],//默认第几个排序
				"bStateSave" : true,//状态保存
				"aoColumnDefs" : [
				//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
				{
					"orderable" : false,
					"aTargets" : [ 1, 2 ]
				} // 制定列不参与排序
				]
			});
			
		});

		
		/*已投票人员*/
		function u_match_vote_already(obj,id,ext1,w,h){
			var info_page = "${ctx}/views/u_match-vote-already-list?id="+id+"&ext1="+ext1;
			
			var index = layer.open({
				type: 2,
				title: "已投票人员",
				content: info_page
			});
			layer.full(index);
		}
	
	</script>
</body>
</html>



